/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package servidor;

import DAO.*;
import Interface.Servidor;
import classes.Hospede;
import classes.ServidorImplement;
import java.rmi.registry.*;

/**
 *
 * @author victor
 */
public class MainServidor {

    public static void main(String[] args) {
        try {
            Configurator c = new Configurator();
            c.lerChave();
            DAOGeneric.setChave(c.getI());
            System.out.println(c.getI());
            Servidor servidor = new ServidorImplement();          

            Registry registry = LocateRegistry.createRegistry(21000);
//
            registry.rebind("servidor", servidor);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
